<!DOCTYPE html>
<html >
<head >
    <style type="text/css">
    body{
        background-color: yellow;
    }
    p{
        background-color:gray;
        padding:20px;
    }
    h1{
        background-image: url(../2008522152545750_2.jpg);
    }

    /* <p class="flower">只有这种样式会生效</p> */
    p.flower{
        background-image: url(../2007122510155321_2.jpg);
    }
    /* 为行内元素设置背景 */
    a.radio {background-image: url(../2007122510155321_2.jpg);}

    </style>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css创建背景</title>
</head>
<body> 
    

    <p>为p添加了背景颜色和padding</p>
    <h1 style="padding:100px;">一道残阳铺水中，半江瑟瑟半江红。可怜九月初三夜，露似真珠月似弓。</h1>
    <p class="flower"> p.flower</p>
    <h2 class="flower">h11111111111111111111</h2>
    <a class="radio" href="https://translate.google.cn/">google translate</a>


</body>
</html>